// 首页数据接口
import request from '@/utils/http.js'
/* 获取抽奖基本信息
 * @params[String] url 请求地址
 * @params[Number] dynamic_id 动态id 1695
 * @return [Promise]
 */
function apiGetDetail ({ url = '/lottery/getDetail', dynamic_id = '' } = {}) {
  return request.get(url, {
    data: {
        dynamic_id
    }
  })
}

/* 获取奖品信息
 * @params[String] url 请求地址
 * @params[Number] business_id 抽奖动态id
 * @params[Number] business_type 类型 默认 3
 * @return [Promise]
 */
function apiGetPrize ({ url = '/lottery/getPrize', business_id = '', business_type = 4 } = {}) {
  return request.get(url, {
    data: {
        business_id,
        business_type
    }
  })
}

export {  
    apiGetDetail,
    apiGetPrize
}
